{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:17.238175Z",
     "start_time": "2018-01-10T00:57:15.711265Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#引入必要的包\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.cluster import MiniBatchKMeans\n",
    "from sklearn import metrics\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn\n",
    "import time\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 读取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:17.311704Z",
     "start_time": "2018-01-10T00:57:17.240617Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>locale</th>\n",
       "      <th>birthyear</th>\n",
       "      <th>gender</th>\n",
       "      <th>joinedAt</th>\n",
       "      <th>location</th>\n",
       "      <th>timezone</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3197468391</td>\n",
       "      <td>id_ID</td>\n",
       "      <td>1993</td>\n",
       "      <td>male</td>\n",
       "      <td>2012-10-02T06:40:55.524Z</td>\n",
       "      <td>Medan  Indonesia</td>\n",
       "      <td>480.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3537982273</td>\n",
       "      <td>id_ID</td>\n",
       "      <td>1992</td>\n",
       "      <td>male</td>\n",
       "      <td>2012-09-29T18:03:12.111Z</td>\n",
       "      <td>Medan  Indonesia</td>\n",
       "      <td>420.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>823183725</td>\n",
       "      <td>en_US</td>\n",
       "      <td>1975</td>\n",
       "      <td>male</td>\n",
       "      <td>2012-10-06T03:14:07.149Z</td>\n",
       "      <td>Stratford  Ontario</td>\n",
       "      <td>-240.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1872223848</td>\n",
       "      <td>en_US</td>\n",
       "      <td>1991</td>\n",
       "      <td>female</td>\n",
       "      <td>2012-11-04T08:59:43.783Z</td>\n",
       "      <td>Tehran  Iran</td>\n",
       "      <td>210.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3429017717</td>\n",
       "      <td>id_ID</td>\n",
       "      <td>1995</td>\n",
       "      <td>female</td>\n",
       "      <td>2012-09-10T16:06:53.132Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>420.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      user_id locale birthyear  gender                  joinedAt  \\\n",
       "0  3197468391  id_ID      1993    male  2012-10-02T06:40:55.524Z   \n",
       "1  3537982273  id_ID      1992    male  2012-09-29T18:03:12.111Z   \n",
       "2   823183725  en_US      1975    male  2012-10-06T03:14:07.149Z   \n",
       "3  1872223848  en_US      1991  female  2012-11-04T08:59:43.783Z   \n",
       "4  3429017717  id_ID      1995  female  2012-09-10T16:06:53.132Z   \n",
       "\n",
       "             location  timezone  \n",
       "0    Medan  Indonesia     480.0  \n",
       "1    Medan  Indonesia     420.0  \n",
       "2  Stratford  Ontario    -240.0  \n",
       "3        Tehran  Iran     210.0  \n",
       "4                 NaN     420.0  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('users.csv')\n",
    "df.head()\n",
    "#数据的前5行"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-09T02:01:10.299230Z",
     "start_time": "2018-01-09T02:01:10.294857Z"
    }
   },
   "source": [
    "# 探索数据　"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:17.330545Z",
     "start_time": "2018-01-10T00:57:17.313794Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 38209 entries, 0 to 38208\n",
      "Data columns (total 7 columns):\n",
      "user_id      38209 non-null int64\n",
      "locale       38209 non-null object\n",
      "birthyear    38209 non-null object\n",
      "gender       38100 non-null object\n",
      "joinedAt     38152 non-null object\n",
      "location     32745 non-null object\n",
      "timezone     37773 non-null float64\n",
      "dtypes: float64(1), int64(1), object(5)\n",
      "memory usage: 2.0+ MB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:17.660309Z",
     "start_time": "2018-01-10T00:57:17.332666Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "user_id         0\n",
       "locale          0\n",
       "birthyear       0\n",
       "gender        109\n",
       "joinedAt       57\n",
       "location     5464\n",
       "timezone      436\n",
       "dtype: int64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(lambda x: sum(x.isnull()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:17.689189Z",
     "start_time": "2018-01-10T00:57:17.662513Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "location属性的不同取值和出现的次数\n",
      "\n",
      "Medan  Indonesia                        4509\n",
      "Yogyakarta                              3092\n",
      "Phnom Penh                              2169\n",
      "Los Angeles  California                 1555\n",
      "                                        1475\n",
      "Santo Domingo  Dominican Republic       1442\n",
      "Toronto  Ontario                         696\n",
      "Phnom Penh  11                           631\n",
      "Tbilisi  Georgia                         540\n",
      "Phnom Pen  Phnum Penh  Cambodia          471\n",
      "San Francisco  California                434\n",
      "Jogjakarta  Indonesia                    418\n",
      "Djokja  Yogyakarta  Indonesia            398\n",
      "Jakarta  Indonesia                       394\n",
      "Jakarta  04                              293\n",
      "Los Angeles  CA                          220\n",
      "Bekasi                                   211\n",
      "Medan  26                                211\n",
      "Torrance  CA                             193\n",
      "undefined  undefined                     191\n",
      "Bandung  Indonesia                       179\n",
      "Miskolc  Hungary                         173\n",
      "Porto Alegre                             159\n",
      "Santo Domingo  05                        155\n",
      "Purwokerto  Jawa Tengah  Indonesia       154\n",
      "Surabaya  Indonesia                      154\n",
      "Ottawa  Ontario                          149\n",
      "New York  New York                       140\n",
      "Jombang  Jawa Timur  Indonesia           131\n",
      "Phoenix  Arizona                         128\n",
      "                                        ... \n",
      "Middletown  Orange County  New York        1\n",
      "Formosa  Argentina                         1\n",
      "Roche Bois  Northern Mariana Islands       1\n",
      "Curtarolo  20                              1\n",
      "Queretaro                                  1\n",
      "Santa Fe Springs  California               1\n",
      "Dana Point  California                     1\n",
      "Panama city  Panama                        1\n",
      "Caloocan  F2                               1\n",
      "Gravatahy  Rio Grande Do Sul  Brazil       1\n",
      "Sukkur  05                                 1\n",
      "Ibb                                        1\n",
      "Quincy  MA                                 1\n",
      "Sagamu                                     1\n",
      "Daska                                      1\n",
      "Buca                                       1\n",
      "Ulaanbaatar  Mongolia                      1\n",
      "Paso Robles  CA                            1\n",
      "Caledonia  Ontario                         1\n",
      "Karanganyar                                1\n",
      "Everett  MA                                1\n",
      "Paradise Valley  Arizona                   1\n",
      "Manila  D9                                 1\n",
      "Spanish Town  10                           1\n",
      "El Portezuelo  La Rioja  Argentina         1\n",
      "Torrington  Connecticut                    1\n",
      "Arbela  Arbil  Iraq                        1\n",
      "Villaflores  Chiapas                       1\n",
      "Studio City  CA                            1\n",
      "Misurata  58                               1\n",
      "Name: location, Length: 2804, dtype: int64\n",
      "\n",
      "gender属性的不同取值和出现的次数\n",
      "\n",
      "male      23242\n",
      "female    14858\n",
      "Name: gender, dtype: int64\n",
      "\n",
      "locale属性的不同取值和出现的次数\n",
      "\n",
      "en_US    17073\n",
      "id_ID    11817\n",
      "es_LA     1999\n",
      "en_GB     1745\n",
      "es_ES      981\n",
      "fa_IR      676\n",
      "ar_AR      584\n",
      "hu_HU      544\n",
      "fr_FR      529\n",
      "pt_BR      472\n",
      "ka_GE      407\n",
      "zh_CN      183\n",
      "ru_RU      135\n",
      "ja_JP      121\n",
      "de_DE      119\n",
      "tr_TR      109\n",
      "ko_KR       91\n",
      "it_IT       78\n",
      "vi_VN       61\n",
      "fr_CA       49\n",
      "zh_TW       41\n",
      "pt_PT       36\n",
      "th_TH       27\n",
      "km_KH       25\n",
      "pl_PL       24\n",
      "jv_ID       23\n",
      "sv_SE       22\n",
      "cs_CZ       22\n",
      "el_GR       19\n",
      "zh_HK       19\n",
      "         ...  \n",
      "bg_BG       11\n",
      "hr_HR       11\n",
      "nl_NL       10\n",
      "he_IL        9\n",
      "sk_SK        7\n",
      "sr_RS        6\n",
      "en_IN        5\n",
      "mk_MK        4\n",
      "da_DK        4\n",
      "nb_NO        4\n",
      "ca_ES        4\n",
      "fi_FI        4\n",
      "bn_IN        4\n",
      "bs_BA        3\n",
      "mn_MN        3\n",
      "fb_LT        2\n",
      "lt_LT        2\n",
      "en_UD        2\n",
      "az_AZ        2\n",
      "ku_TR        2\n",
      "lv_LV        2\n",
      "uk_UA        2\n",
      "af_ZA        2\n",
      "es_MX        1\n",
      "eo_EO        1\n",
      "et_EE        1\n",
      "hi_IN        1\n",
      "tl_PH        1\n",
      "cy_GB        1\n",
      "pa_IN        1\n",
      "Name: locale, Length: 64, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "user_id = df[\"user_id\"]\n",
    "\n",
    "var = ['location','gender','locale']\n",
    "for v in var:\n",
    "    print('\\n%s属性的不同取值和出现的次数\\n'%v)\n",
    "    print(df[v].value_counts())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 特征工程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:17.747844Z",
     "start_time": "2018-01-10T00:57:17.691529Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#特征编码\n",
    "import datetime\n",
    "import hashlib\n",
    "import locale\n",
    "\n",
    "from collections import defaultdict\n",
    "from sklearn.preprocessing import normalize\n",
    "\n",
    "class FeatureEng:\n",
    "    def __init__(self):\n",
    "         # 载入 locales\n",
    "        self.localeIdMap = defaultdict(int)\n",
    "        for i, l in enumerate(locale.locale_alias.keys()):\n",
    "          self.localeIdMap[l] = i + 1\n",
    "        \n",
    "        # 载入 gender id 字典\n",
    "        ##缺失补0\n",
    "        self.genderIdMap = defaultdict(int, {'NaN': 0, \"male\":1, \"female\":2})\n",
    "  \n",
    "    def getLocaleId(self, locstr):\n",
    "        return self.localeIdMap[locstr.lower()]\n",
    "\n",
    "    def getGenderId(self, genderStr):\n",
    "        return self.genderIdMap[genderStr]\n",
    "\n",
    "    def getJoinedYearMonth(self, dateString):\n",
    "        try:\n",
    "            dttm = datetime.datetime.strptime(dateString, \"%Y-%m-%dT%H:%M:%S.%fZ\")\n",
    "            #return \"\".join([str(dttm.year), str(dttm.month)])\n",
    "            return (dttm.year-2010)*12 + dttm.month\n",
    "        except:  #缺失补0\n",
    "          return 0\n",
    "\n",
    "    def getBirthYearInt(self, birthYear):\n",
    "        #缺失补0\n",
    "        try:\n",
    "          return 0 if birthYear == \"None\" else int(birthYear)\n",
    "        except:\n",
    "          return 0\n",
    "\n",
    "    def getTimezoneInt(self, timezone):\n",
    "        try:\n",
    "          return int(timezone)\n",
    "        except:  #缺失值处理\n",
    "          return 0\n",
    "    \n",
    "    def getLocationInt(self,lcation):\n",
    "        # 取前3个最多的城市\n",
    "        return {'Medan  Indonesia': 1,\n",
    "                'Yogyakarta': 2,\n",
    "                'Phnom Penh': 3\n",
    "               }.get(lcation,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:19.950030Z",
     "start_time": "2018-01-10T00:57:17.750102Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "FE = FeatureEng()\n",
    "\n",
    "cols = ['LocaleId','locationInt', 'BirthYearInt', 'GenderId', 'JoinedYearMonth', 'TimezoneInt']\n",
    "n_cols = len(cols)\n",
    "userMatrix = np.zeros((df.shape[0],n_cols), dtype=np.int)\n",
    "\n",
    "for i in range(df.shape[0]): \n",
    "    userMatrix[i, 0] = FE.getLocaleId(df.loc[i,'locale'])\n",
    "    userMatrix[i, 1] = FE.getLocationInt(df.loc[i,'location'])\n",
    "    userMatrix[i, 2] = FE.getBirthYearInt(df.loc[i,'birthyear'])\n",
    "    userMatrix[i, 3] = FE.getGenderId(df.loc[i,'gender'])\n",
    "    userMatrix[i, 4] = FE.getJoinedYearMonth(df.loc[i,'joinedAt'])\n",
    "    userMatrix[i, 5] = FE.getTimezoneInt(df.loc[i,'timezone'])\n",
    "\n",
    "# 归一化用户矩阵\n",
    "userMatrix = normalize(userMatrix, norm=\"l1\", axis=0, copy=False)\n",
    "\n",
    "df_FE = pd.DataFrame(data=userMatrix, columns=cols)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 模型训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T00:57:19.965595Z",
     "start_time": "2018-01-10T00:57:19.952295Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 一个参数点（聚类数据为K）的模型，在校验集上评价聚类算法性能\n",
    "def K_cluster_analysis(K, df):\n",
    "    start = time.time()\n",
    "    \n",
    "    print(\"K-means begin with clusters: {}\".format(K));\n",
    "    \n",
    "    mb_kmeans = MiniBatchKMeans(n_clusters=K)\n",
    "    mb_kmeans.fit(df)\n",
    "    \n",
    "    pred = mb_kmeans.predict(df)\n",
    "    CH_score1 = metrics.calinski_harabaz_score(df,pred)\n",
    "    CH_score2 = metrics.silhouette_score(df,pred)\n",
    "    \n",
    "    end = time.time()\n",
    "    print(\"CH_score1: {}, time elaps:{}\".format(CH_score1, int(end-start)))\n",
    "    print(\"CH_score2: {}, time elaps:{}\".format(CH_score2, int(end-start)))\n",
    "    \n",
    "    return CH_score1,CH_score2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:15:02.278022Z",
     "start_time": "2018-01-10T00:57:19.968204Z"
    },
    "run_control": {
     "marked": true
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters: 10\n",
      "CH_score1: 60710.43880187049, time elaps:222\n",
      "CH_score2: 0.42495325557565494, time elaps:222\n",
      "K-means begin with clusters: 20\n",
      "CH_score1: 63754.309968768306, time elaps:131\n",
      "CH_score2: 0.571000626698175, time elaps:131\n",
      "K-means begin with clusters: 30\n",
      "CH_score1: 79601.65127426479, time elaps:97\n",
      "CH_score2: 0.6667291557002295, time elaps:97\n",
      "K-means begin with clusters: 40\n",
      "CH_score1: 94753.0104567509, time elaps:93\n",
      "CH_score2: 0.6992126032364397, time elaps:93\n",
      "K-means begin with clusters: 50\n",
      "CH_score1: 78325.17114641359, time elaps:91\n",
      "CH_score2: 0.6743608479491613, time elaps:91\n",
      "K-means begin with clusters: 60\n",
      "CH_score1: 86894.34762494889, time elaps:88\n",
      "CH_score2: 0.7194982468901201, time elaps:88\n",
      "K-means begin with clusters: 70\n",
      "CH_score1: 107075.21645170369, time elaps:89\n",
      "CH_score2: 0.735340873148092, time elaps:89\n",
      "K-means begin with clusters: 80\n",
      "CH_score1: 88898.95443654702, time elaps:87\n",
      "CH_score2: 0.7197311758057099, time elaps:87\n",
      "K-means begin with clusters: 90\n",
      "CH_score1: 77835.78091977631, time elaps:87\n",
      "CH_score2: 0.6916329017776602, time elaps:87\n",
      "K-means begin with clusters: 100\n",
      "CH_score1: 86634.60303703086, time elaps:72\n",
      "CH_score2: 0.6636943961662443, time elaps:72\n"
     ]
    }
   ],
   "source": [
    "# 设置超参数（聚类数目K）搜索范围\n",
    "Ks = np.linspace(10,100,10,dtype=int)\n",
    "CH1_scores = []\n",
    "CH2_scores = []\n",
    "for K in Ks:\n",
    "    ch1,ch2 = K_cluster_analysis(K, df_FE)\n",
    "    CH1_scores.append(ch1)\n",
    "    CH2_scores.append(ch2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:15:02.687758Z",
     "start_time": "2018-01-10T01:15:02.317243Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x109fa3470>]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAD8CAYAAACLrvgBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xuc1nP+//HHKykV6SCWQlmtZVm2\nWrJsa7Upp23XOvWTjgotldivKCqntRs2sUozUTmUU2id0qaEzWFapFhKqEjNVhLp/P798frMNmpq\nrpm5rutzHZ73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HAbsD55Nd7Yxw77l5aoZ1Sk0FJI0YhhGUhhH9H36/F/yA0xnc5HB+dNh7f\nsTAvmFkT4HSgMPrZgJPxpfchj16PUrtjjgXfHTOE8BX5+/6oDtQys+pAbWAZefTeCCHMAlZtd3hn\n74X/7ZQaQngdKNkptcqUNDKEmTUFfga8wc53P8wHI4D/A7ZGPzcEvgohbI5+zqcdHCu6O2bOCiF8\nDtyGr5y9DFgDzCF/3xslKrpTapUpaWQAM9sTeALoH0L4Ou544mJmZwArQghzSh8u49R8GfJX0d0x\nc1bUVt8RaAYcANTBm2C2ly/vjfKk7P+NkkbMzGx3PGE8FEKYHB3e2e6Hue4E4Ldm9ikwCW96GIGX\n1iV7v+x0B8ccVNHdMXPZb4BPQgjFIYRNwGTgF+Tve6NERXdKrTIljRhF7fVjgQ9CCHeUumtnux/m\ntBDCNSGEJiGEpngn50shhAuAGcDZ0Wn59HpUdHfMXLYYaG1mtaP/NyWvRV6+N0qp6E6pVabJfTEy\nsxOBV4D32NaGfy3er/EocBDR7oeldjPMC2Z2EnBVCOEMMzsErzwaAG8DnUMIG+KML13M7Bh8UMAO\nu2OSZ+8PMxsGnIePOnwbuAhvp8+L94aZTQROwlezXQ4MAZ6ijPdClFjvxkdbrQO6hxCSsjudkoaI\niCRMzVMiIpIwJQ0REUmYkoaIiCRMSUNERBKmpCEiIglT0hARkYQpaYiISMKUNEREJGH/HzqaQcgt\nn74DAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x101f1e358>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH1_scores), 'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:15:03.051813Z",
     "start_time": "2018-01-10T01:15:02.691146Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x106f68f60>]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8FPX9x/HXBxARRAGJitxoQKwn\nREREPEEFFKuoeCBaqVqKWv2hQq1yWBXxgPYnWpXigS3gDy1HQBHkqAcoQW6EAAEhcoW7gECOz++P\nLHTBxCywyWR338/HYx9kZmd2P5nH5L3Dd2Y+a+6OiIgkhjJBFyAiIiVHoS8ikkAU+iIiCUShLyKS\nQBT6IiIJRKEvIpJAIgp9M7vWzJaa2XIz61nA8wPNbG7okW5m28Keyw17bmw0ixcRkcNjRV2nb2Zl\ngXSgNZAJzAJud/fFhSz/EHCBu/8mNL3T3Y+PatUiInJEIjnSbwYsd/cMd98HjAA6/MLytwPDo1Gc\niIhEV7kIlqkJrAmbzgQuKmhBM6sL1AemhM2uYGZpQA7Q391H/9KbVa9e3evVqxdBWSIist/s2bM3\nuXtSUctFEvpWwLzCxoQ6AaPcPTdsXh13X2tmDYApZrbA3Vcc9AZm9wP3A9SpU4e0tLQIyhIRkf3M\n7IdIlotkeCcTqB02XQtYW8iynThkaMfd14b+zQCmARccupK7v+XuKe6ekpRU5AeViIgcoUhCfxaQ\nbGb1zaw8+cH+s6twzKwRUBWYETavqpkdG/q5OnAJUOAJYBERKX5FDu+4e46ZdQcmAmWBoe6+yMz6\nAWnuvv8D4HZghB98OVBj4E0zyyP/A6Z/YVf9iIhI8Svyks2SlpKS4hrTFxE5PGY2291TilpOd+SK\niCQQhb6ISAJR6IuIJJBIrtMXkTiRm5fLtz9+y1drvuK8U86jVd1WHFvu2KDLkhKk0BeJczv27uCz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75391fDnhoLdAn93IX8sf645u693L2Wu9cj/wTd\nFHe/E5gKdAwtlhDbAsDd1wNrzKxRaNZVwGIScN8IWQ00N7OKob+b/dsjIfePMIXtD2OBu0NX8TQH\ntu8fBjoaujnrKJlZS+ALYAH/Hcf+I/nj+h8Cdcjf2W9x9y2BFBkAM7sc6OHu7c2sAflH/tWAOcBd\n7r43yPpKipmdDwwBygMZwL3kH2wl5L5hZn2B28i/6m0O0JX8ceqE2D/MbDhwOfndNDcAvYHRFLA/\nhD4YXyP/ap/dwL3unnbUNSj0RUQSh4Z3REQSiEJfRCSBKPRFRBKIQl9EJIEo9EVEEohCX0QkgSj0\nRUQSiEJfRCSB/D8S8rzZPGjbnQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x109fd5780>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH2_scores), 'g-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "silhouette_score > 0.5 表明聚类合适,calinski_harabaz_score 类别内部数据的协方差越小越好，类别之间的协方差越大越好，这样的Calinski-Harabasz分数会高 ，综上 当 k = 70 时 silhouette_score,calinski_harabaz_score 评分最高"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:30:58.608860Z",
     "start_time": "2018-01-10T01:30:58.157972Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "n_clusters = 70\n",
    "mb_kmeans = MiniBatchKMeans(n_clusters = n_clusters)\n",
    "mb_kmeans.fit(df_FE)\n",
    "df_pred = mb_kmeans.labels_\n",
    "cents = mb_kmeans.cluster_centers_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:30:59.462980Z",
     "start_time": "2018-01-10T01:30:59.456748Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 3,  3, 43, ...,  0, 32, 36], dtype=int32)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:31:00.743035Z",
     "start_time": "2018-01-10T01:31:00.730392Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  3.66070798e-05,   0.00000000e+00,   2.72611452e-05,\n",
       "          1.88556894e-05,   2.65251788e-05,   3.15447115e-05],\n",
       "       [  3.65694343e-05,   1.16279070e-04,   2.72601951e-05,\n",
       "          1.87871980e-05,   2.65663823e-05,   3.10130241e-05],\n",
       "       [  2.03610490e-05,   0.00000000e+00,   2.71777008e-05,\n",
       "          1.86791162e-05,   2.58899965e-05,  -2.29677829e-05],\n",
       "       [  3.64991063e-05,   5.81395349e-05,   2.72860226e-05,\n",
       "          1.88828883e-05,   2.62511828e-05,   3.11953231e-05],\n",
       "       [  2.06334647e-05,   1.74418605e-04,   2.72375045e-05,\n",
       "          1.88189327e-05,   2.67560525e-05,   3.10597991e-05],\n",
       "       [  2.00032578e-05,   0.00000000e+00,   2.72101797e-05,\n",
       "          1.88518819e-05,   2.67356408e-05,   1.50125012e-05],\n",
       "       [  2.25443873e-05,   0.00000000e+00,   2.72338567e-05,\n",
       "          3.77657767e-05,   2.53834409e-05,  -1.66454402e-05],\n",
       "       [  5.85118287e-05,   0.00000000e+00,   2.72313826e-05,\n",
       "          1.87938181e-05,   2.59421904e-05,  -1.10121135e-05],\n",
       "       [  1.97015945e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          1.88072054e-05,   2.22374058e-05,  -1.79208565e-05],\n",
       "       [  3.54238223e-05,   5.81395349e-05,   2.72617560e-05,\n",
       "          1.91924439e-05,   2.62759248e-05,  -1.92451512e-05],\n",
       "       [  3.64938815e-05,   1.16279070e-04,   2.72773945e-05,\n",
       "          3.77657767e-05,   2.65843323e-05,   3.13162406e-05],\n",
       "       [  2.50465766e-05,   0.00000000e+00,   2.72091943e-05,\n",
       "          1.88828883e-05,   2.67419249e-05,  -4.07532613e-05],\n",
       "       [  2.02508661e-05,   0.00000000e+00,   2.72679909e-05,\n",
       "          3.77657767e-05,   2.62612411e-05,   3.18709093e-05],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.72231494e-05,\n",
       "          3.77657767e-05,   2.65089624e-05,  -3.59164317e-05],\n",
       "       [  3.66777054e-05,   0.00000000e+00,   2.72007934e-05,\n",
       "          3.77657767e-05,   2.65202246e-05,   3.15269112e-05],\n",
       "       [  3.48475596e-05,   0.00000000e+00,   2.71611884e-05,\n",
       "          3.77657767e-05,   2.64663353e-05,   4.51561577e-06],\n",
       "       [  3.51514720e-05,   5.81395349e-05,   2.72994156e-05,\n",
       "          3.77657767e-05,   2.63004514e-05,   3.13557923e-05],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.72550988e-05,\n",
       "          1.88483675e-05,   2.63847624e-05,  -1.79213208e-05],\n",
       "       [  3.35459937e-05,   1.16279070e-04,   2.72687671e-05,\n",
       "          2.61743007e-05,   2.66081106e-05,  -3.08193803e-05],\n",
       "       [  2.19991961e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          2.61194443e-05,   2.25218296e-05,   2.17679999e-05],\n",
       "       [  2.03827590e-05,   1.74418605e-04,   2.72561475e-05,\n",
       "          3.77657767e-05,   2.67782163e-05,   3.12278778e-05],\n",
       "       [  2.81810141e-08,   0.00000000e+00,   2.70767676e-05,\n",
       "          2.66661577e-05,   2.65333897e-05,   3.51440353e-05],\n",
       "       [  2.02521116e-05,   0.00000000e+00,   2.72347055e-05,\n",
       "          1.88270218e-05,   2.65723129e-05,   3.24274069e-05],\n",
       "       [  3.22350257e-06,   0.00000000e+00,   0.00000000e+00,\n",
       "          3.54054156e-05,   2.24501132e-05,  -2.06590745e-05],\n",
       "       [  2.07109507e-05,   0.00000000e+00,   2.72608819e-05,\n",
       "          3.77657767e-05,   2.65206365e-05,   1.78473545e-05],\n",
       "       [  7.89037457e-05,   0.00000000e+00,   2.72254863e-05,\n",
       "          1.88828883e-05,   2.63659161e-05,  -2.95442452e-05],\n",
       "       [  7.84812872e-05,   0.00000000e+00,   2.65381264e-05,\n",
       "          2.26360090e-05,   2.65848758e-05,   3.44143366e-05],\n",
       "       [  2.04439020e-05,   0.00000000e+00,   2.71859844e-05,\n",
       "          3.77657767e-05,   2.66177072e-05,  -3.59749304e-05],\n",
       "       [  7.44587496e-08,   0.00000000e+00,   2.72092052e-05,\n",
       "          1.88828883e-05,   2.68294858e-05,   1.39367026e-05],\n",
       "       [  3.60482108e-05,   0.00000000e+00,   2.71861626e-05,\n",
       "          1.88828883e-05,   2.65276181e-05,   4.58692644e-06],\n",
       "       [  1.99405603e-05,   1.16279070e-04,   2.72596442e-05,\n",
       "          3.77657767e-05,   2.65793413e-05,   3.09034650e-05],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.71919914e-05,\n",
       "          1.87513003e-05,   2.67804453e-05,  -3.60391924e-05],\n",
       "       [  1.92397654e-05,   1.16279070e-04,   2.72444776e-05,\n",
       "          1.87499102e-05,   2.65361117e-05,   3.12789322e-05],\n",
       "       [  6.32200336e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          2.85940880e-05,   2.24431863e-05,  -1.49285305e-05],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.71169425e-05,\n",
       "          1.88054994e-05,   2.68132712e-05,   6.59729616e-06],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.72293855e-05,\n",
       "          1.88828883e-05,   2.63596287e-05,  -2.79562155e-05],\n",
       "       [  2.01737810e-05,   0.00000000e+00,   2.71895440e-05,\n",
       "          1.88131583e-05,   2.65106020e-05,  -3.44421452e-05],\n",
       "       [  7.88831160e-05,   0.00000000e+00,   2.72284198e-05,\n",
       "          3.77657767e-05,   2.58781742e-05,  -2.88432610e-05],\n",
       "       [  1.99036718e-05,   0.00000000e+00,   2.72504687e-05,\n",
       "          1.88512056e-05,   2.66015634e-05,   1.79289455e-05],\n",
       "       [  1.91734869e-05,   0.00000000e+00,   2.71676057e-05,\n",
       "          1.86131328e-05,   2.66990794e-05,   2.21069302e-06],\n",
       "       [  2.02867410e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          1.86051988e-05,   2.39247300e-05,  -3.06698157e-05],\n",
       "       [  2.00591635e-05,   0.00000000e+00,   2.71845967e-05,\n",
       "          3.77657767e-05,   2.42933827e-05,  -1.77032834e-05],\n",
       "       [  3.82720570e-05,   0.00000000e+00,   2.72652771e-05,\n",
       "          3.77657767e-05,   2.61530008e-05,  -2.81898716e-05],\n",
       "       [  2.07088839e-05,   0.00000000e+00,   2.71957282e-05,\n",
       "          1.86200496e-05,   2.46441674e-05,  -1.75135362e-05],\n",
       "       [  5.85299803e-05,   0.00000000e+00,   2.72436170e-05,\n",
       "          3.77657767e-05,   2.60847933e-05,  -9.87581669e-06],\n",
       "       [  1.93741692e-05,   0.00000000e+00,   2.71995477e-05,\n",
       "          3.77657767e-05,   2.64981571e-05,   3.52880237e-06],\n",
       "       [  5.77941569e-05,   0.00000000e+00,   2.55233742e-05,\n",
       "          1.86010542e-05,   2.62850363e-05,   9.59047860e-06],\n",
       "       [  2.71535174e-05,   0.00000000e+00,   2.72044078e-05,\n",
       "          1.88470574e-05,   2.69135271e-05,   1.57916115e-05],\n",
       "       [  2.04083873e-05,   1.72674419e-04,   2.72700092e-05,\n",
       "          2.56807281e-05,   2.68043685e-05,  -2.90820478e-05],\n",
       "       [  1.99847446e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          3.77657767e-05,   2.53986676e-05,  -3.20804591e-05],\n",
       "       [  3.56312347e-05,   5.81395349e-05,   2.72956917e-05,\n",
       "          2.73677104e-05,   2.62648873e-05,  -3.45067475e-05],\n",
       "       [  4.00769803e-05,   0.00000000e+00,   2.71700984e-05,\n",
       "          1.88828883e-05,   2.67760617e-05,   1.75267872e-05],\n",
       "       [  1.98967627e-05,   5.81395349e-05,   2.72602093e-05,\n",
       "          1.90736246e-05,   2.62287773e-05,   3.13521598e-05],\n",
       "       [  7.26948686e-05,   0.00000000e+00,   2.69322187e-05,\n",
       "          2.38860468e-05,   2.66031210e-05,   8.77957219e-06],\n",
       "       [  6.07489613e-05,   0.00000000e+00,   2.71666992e-05,\n",
       "          3.74510618e-05,   2.65845545e-05,   2.24192647e-05],\n",
       "       [  4.15877968e-05,   0.00000000e+00,   2.70892809e-05,\n",
       "          3.77657767e-05,   2.68014085e-05,   1.69121129e-05],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.72769968e-05,\n",
       "          3.77657767e-05,   2.65344843e-05,  -1.27490596e-05],\n",
       "       [  2.06995850e-05,   0.00000000e+00,   2.71825449e-05,\n",
       "          3.77657767e-05,   2.59642227e-05,  -2.28447298e-05],\n",
       "       [  2.43195265e-07,   0.00000000e+00,   2.72941987e-05,\n",
       "          3.74562211e-05,   2.66193178e-05,   6.25102923e-06],\n",
       "       [  3.79092122e-05,   0.00000000e+00,   2.72524567e-05,\n",
       "          1.88828883e-05,   2.64667846e-05,  -3.53189801e-05],\n",
       "       [  2.12058446e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          3.77657767e-05,   2.23910630e-05,  -1.77266472e-05],\n",
       "       [  3.59311780e-05,   5.81395349e-05,   2.73041819e-05,\n",
       "          2.79987654e-05,   2.61502771e-05,   3.56510393e-06],\n",
       "       [  2.16466079e-05,   0.00000000e+00,   0.00000000e+00,\n",
       "          3.77657767e-05,   2.22658574e-05,  -3.00899883e-05],\n",
       "       [  0.00000000e+00,   0.00000000e+00,   2.72693684e-05,\n",
       "          3.77657767e-05,   2.62989916e-05,  -2.00787536e-05],\n",
       "       [  1.98062795e-05,   0.00000000e+00,   2.71911023e-05,\n",
       "          1.88828883e-05,   2.62960062e-05,   9.01061357e-06],\n",
       "       [  1.99304531e-05,   0.00000000e+00,   2.72128819e-05,\n",
       "          3.03399217e-05,   2.64386899e-05,   5.13879775e-05],\n",
       "       [  2.00504349e-05,   0.00000000e+00,   2.72333477e-05,\n",
       "          1.88828883e-05,   2.67092264e-05,   2.34921545e-05],\n",
       "       [  3.46092097e-05,   0.00000000e+00,   2.72194417e-05,\n",
       "          1.88828883e-05,   2.59230272e-05,  -2.02018434e-05],\n",
       "       [  2.77630727e-05,   0.00000000e+00,   2.72352910e-05,\n",
       "          1.87058612e-05,   2.66807231e-05,   3.72419191e-06],\n",
       "       [  2.02635502e-05,   0.00000000e+00,   2.71956414e-05,\n",
       "          3.77657767e-05,   2.55471159e-05,  -3.11113450e-05]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cents"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:32:36.179914Z",
     "start_time": "2018-01-10T01:32:36.166144Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LocaleId</th>\n",
       "      <th>locationInt</th>\n",
       "      <th>BirthYearInt</th>\n",
       "      <th>GenderId</th>\n",
       "      <th>JoinedYearMonth</th>\n",
       "      <th>TimezoneInt</th>\n",
       "      <th>cluster_70</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000058</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000058</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000016</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   LocaleId  locationInt  BirthYearInt  GenderId  JoinedYearMonth  \\\n",
       "0  0.000036     0.000058      0.000027  0.000019         0.000026   \n",
       "1  0.000036     0.000058      0.000027  0.000019         0.000026   \n",
       "2  0.000020     0.000000      0.000027  0.000019         0.000026   \n",
       "3  0.000020     0.000000      0.000027  0.000038         0.000027   \n",
       "4  0.000036     0.000000      0.000027  0.000038         0.000026   \n",
       "\n",
       "   TimezoneInt  cluster_70  \n",
       "0     0.000036           3  \n",
       "1     0.000031           3  \n",
       "2    -0.000018          43  \n",
       "3     0.000016          24  \n",
       "4     0.000031          14  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_FE['cluster_70'] = df_pred\n",
    "df_FE.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-01-10T01:33:20.380911Z",
     "start_time": "2018-01-10T01:33:19.950045Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df_FE.to_csv('submission.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "hide_input": false,
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "latex_envs": {
   "LaTeX_envs_menu_present": true,
   "autocomplete": true,
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 1,
   "hotkeys": {
    "equation": "Ctrl-E",
    "itemize": "Ctrl-I"
   },
   "labels_anchors": false,
   "latex_user_defs": false,
   "report_style_numbering": false,
   "user_envs_cfg": false
  },
  "nbTranslate": {
   "displayLangs": [
    "*"
   ],
   "hotkey": "alt-t",
   "langInMainMenu": true,
   "sourceLang": "en",
   "targetLang": "fr",
   "useGoogleTranslate": true
  },
  "toc": {
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": "block",
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
